package com.zb.sannuo.account.controller;

import com.zb.sannuo.account.service.AccountService;
import com.zb.sannuo.common.result.Result;
import com.zb.sannuo.common.result.ResultCode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/lo")
@Api(tags = "系统账号管理模块",description = "对系统账号管理进行CRUD操作" )
@CrossOrigin
public class AccountStatusContoller {

    @Resource
    private AccountService accountServiceImpl;


    //正常状态
    @RequestMapping(value = "{phone}",method = RequestMethod.GET)
    @ApiOperation(value = "状态的更改",notes = "状态的更改",httpMethod = "GET")
    public Result trueStatus(@PathVariable("phone") String phone) throws Exception{
        int i = accountServiceImpl.TrueStatus(phone);
        if (i>0){
            return Result.ok(ResultCode.SUCCESS,i);
        }else{
            return Result.fail(ResultCode.FAIL,null);
        }
    }
}
